import { useEffect,useState } from "react"
import { ChannelItem,fetchChannelAPI } from "@/apis/list"
function useTabs(){
    const [channels, setChannels] = useState<ChannelItem[]>([])
    useEffect(() => {
        const getChannels = async () => {
            const res = await fetchChannelAPI()
            setChannels(res.data.data.channels)
        }
        getChannels()
    }, [])
    return channels
}

export {useTabs}